package com.tencent.iov.cowin.befsale.clue.dao.http.crm;

import com.tencent.iov.cowin.befsale.clue.dao.http.crm.request.SyncCrmCreateClueRequest;
import com.tencent.iov.cowin.befsale.clue.dao.http.crm.request.SyncCrmUpdateClueRequest;
import com.tencent.iov.cowin.befsale.clue.dao.http.crm.response.SyncCrmCreateResponse;
import com.tencent.iov.cowin.befsale.clue.value.contants.ServiceConstant;
import com.software.boot.common.entity.Response;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestHeader;

/**
 * @author: zly
 * @description:
 * @createDate: 2022-01-22
 **/

@FeignClient( name=ServiceConstant.CRM_LEAD_SERVICE,url = ServiceConstant.CRM_LEAD_API_HOST)
public interface CrmClient {

    /**
     * add by zly
     * 2022-01-22
     * 线索定时同步--定时同步crm新增
     * @param request
     * @return
     */
    @PostMapping("crm-lead-api/api/v1/leadInfo/createLead")
    @ApiOperation(value = "CRM线索信息新建", httpMethod = "POST", response = Response.class, notes = "get_user_behavior_data")
    SyncCrmCreateResponse clueInitialDataToCrm(@RequestBody SyncCrmCreateClueRequest request, @RequestHeader(value ="Authorization" ) String authorization);

    /**
     * add by zly
     * 2022-01-23
     * 线索定时同步--定时同步crm修改
     * @param request
     * @return
     */
    @PostMapping("crm-lead-api/api/v1/leadInfo/update")
    @ApiOperation(value = "CRM线索信息新建", httpMethod = "POST", response = Response.class, notes = "get_user_behavior_data")
    SyncCrmCreateResponse clueInitialDataToCrmUpdate(@RequestBody SyncCrmUpdateClueRequest request, @RequestHeader(value ="Authorization" ) String authorization);

}
